import { Children, lazy } from "react";
import {
    AppOutline,
    AppstoreOutline,
    MessageOutline,
    UserContactOutline
} from 'antd-mobile-icons'

const Index = lazy(() => import('../pages/index'))
const Class = lazy(() => import('../pages/class'))
const Message = lazy(() => import('../pages/message'))
const User = lazy(() => import('../pages/user'))
const Home = lazy(() => import('../pages/home'))
const City = lazy(() => import('../pages/city'))
const List = lazy(() => import('../pages/list'))

export const homeRouters = [
    {
        path: '/',
        element: <Index></Index>,
        title: '首页',
        icon: <AppOutline />
    },
    {
        path: '/class',
        element: <Class></Class>,
        title: '分类',
        icon: <AppstoreOutline />
    },
    {
        path: '/message',
        element: <Message></Message>,
        title: '消息',
        icon: <MessageOutline />
    },
    {
        path: '/user',
        element: <User></User>,
        title: '我的',
        icon: <UserContactOutline />
    },
]

export const routers = [
    {
        path:'/',
        element:<Home></Home>,
        children:homeRouters
    },
    {
        path:'/city/:type',
        element:<City></City>
    },
    {
        path:'/list',
        element:<List></List>
    },
]